package svc

import (
	"automated-modeling/api/internal/config"
	"automated-modeling/automatedrpc/automatedrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config       config.Config
	AutomatedRpc automatedrpcclient.Automatedrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:       c,
		AutomatedRpc: automatedrpcclient.NewAutomatedrpc(zrpc.MustNewClient(c.AutomatedRpc)),
	}
}
